home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Leonardo the Inventor
/
Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso
/
LEOWINMV
/
HELP.DIR
/
00039_Script_39
< prev
next >
Wrap
Text File
|
1996-03-28
|
3KB
|
123 lines
--value of column--
on left
return the left of sprite the clickOn
end left
on columnWidth numColumns
return (the width of sprite the clickOn)/numColumns
end columnWidth
on getColumnValue H,L,numColumns
return (H-L)/columnWidth(numColumns)
end getColumnValue
--value of row--
on top
return the top of sprite the clickOn
end top
on rowHeight numRows
return (the height of sprite the clickOn)/numRows
end rowHeight
on getRowValue V,top,numRows
return (V-top)/rowHeight(numRows)
end getRowValue
on getSerial column,row,numColumns
return numColumns*row+column
end getSerial
on HelpText Horiz,V,numColumns,numRows,dataName
global topicSprite
set column=getcolumnValue(Horiz,left(),numColumns)
set row=getrowValue(V,top(),numRows)
set aserial=getserial(column,row,numColumns) +1
set helpTopic=line aserial of the text of cast dataName
if not (helpTopic = "") then
HiliteIndexChoice column,Row,numColumns,numRows
set the castNum of sprite topicSprite to the number of cast helpTopic
updateStage
end if
end HelpText
-- Additional script by ET
on startMovie
global indexHiliteSprite, topicSprite
set indexHiliteSprite = 8
puppetSprite indexHiliteSprite, true
set topicSprite = 12
puppetSprite topicSprite, true
end startMovie
-----------------
on getGridSquareCenter Pixels, NumSquares, Square
set SquareSize = Pixels / NumSquares
return integer (Square * SquareSize - (SquareSize / 2))
end getGridSquareCenter
-----------------
on hideIndexhilite
global indexHiliteSprite
puppetSprite indexHiliteSprite, false
updateStage
end hideIndexhilite
on positionIndexHilite H, V
global indexHiliteSprite
set the locH of sprite indexHiliteSprite = H
set the locV of sprite indexHiliteSprite = V
updateStage
end positionIndexHilite
on HiliteIndexChoice Col,Row,numColumns,numRows
put the ClickOn into gridSprite
set H = getGridSquareCenter (the width of sprite gridSprite, numColumns, Col+1)
set V = getGridSquareCenter (the height of sprite gridSprite, numRows, Row+1)
put H + the left of sprite gridSprite into H
put V + the top of sprite gridSprite into V
positionIndexHilite H, V
end HiliteIndexChoice
-------------------
on returnFromIndex
global indexReturn
if (indexReturn = "") or (not stringP(indexReturn)) then
set indexReturn = "frame"&"e&"Contents""e&&"of movie"&"e&"Leonardo""e
end if
do "go"&&indexReturn
end returnFromIndex
on fromLittleGuys SpriteName
global indexHiliteSprite, topicSprite
puppetSprite indexHiliteSprite, false
puppetSprite topicSprite, false
updateStage
go SpriteName
end fromLittleGuys
on toLittleGuys
global indexHiliteSprite, topicSprite
go "littleguys"
puppetSprite indexHiliteSprite, true
puppetSprite topicSprite, true
updateStage
end toLittleGuys
on pauseFrame
go the frame
end pauseFrame